package com.rongke.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * @MsgUser
 * @用户消息(msg_user)
 * @version : Ver 1.0
 */
@TableName("msg_user")
public class MsgUser implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:用户消息表主键
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;


	/**
	 * @备注:用户id
	 * @字段:muser_id BIGINT(19)
	 */
	private Long muserId;
	/**
	 * 备注:用户id
	 */
	@TableField(exist = false)
	private Muser muser;

	/**
	 * 备注:标题
	 */
	private String title;
	/**
	 * @备注:消息内容（系统消息时取message表内容）
	 * @字段:msg_content TEXT(65535)
	 */
	private String msgContent;


	/**
	 * @备注:message表id
	 * @字段:msg_id BIGINT(19)
	 */
	private Long msgId;
	/**
	 * 备注:message表id
	 */
	@TableField(exist = false)
	private Message msg;


	/**
	 * @备注:消息类型 0 后台系统消息 1 ……
	 * @字段:msg_type INT(10)
	 */
	private Integer msgType;


	/**
	 * @备注:消息读取状态（ 0 未读 1已读）
	 * @字段:read INT(10)
	 */
	private Integer isRead;


	/**
	 * @备注:创建时间
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime=new Date();


	public MsgUser(){
	}

	public MsgUser(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public void setMuserId(Long muserId) {
			this.muserId = muserId;
			}

	public Long getMuserId() {
			return this.muserId;
	}
	public void setMuser(Muser muser) {
		this.muser = muser;
	}

	public Muser getMuser() {
		return this.muser;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}

	public String getMsgContent() {
		return this.msgContent;
	}

	public void setMsgId(Long msgId) {
			this.msgId = msgId;
			}

	public Long getMsgId() {
			return this.msgId;
	}
	public void setMsg(Message msg) {
		this.msg = msg;
	}

	public Message getMsg() {
		return this.msg;
	}


	public void setMsgType(Integer msgType) {
		this.msgType = msgType;
	}

	public Integer getMsgType() {
		return this.msgType;
	}


	public Integer getIsRead() {
		return isRead;
	}

	public void setIsRead(Integer isRead) {
		this.isRead = isRead;
	}

	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}
}
